package com.ycsyxt.service;

import com.ycsyxt.entity.LoginUser;
import com.ycsyxt.util.DbUtils;

import org.springframework.security.core.userdetails.UserDetails;
import org.springframework.security.core.userdetails.UserDetailsService;
import org.springframework.security.core.userdetails.UsernameNotFoundException;
import org.springframework.stereotype.Service;

/**
 * @author ycs(15241496739 @ 163.com)
 * @date 2022/4/17
 **/
@Service
public class UserDetailsServiceImpl implements UserDetailsService {

    @Override
    public UserDetails loadUserByUsername(String s) throws UsernameNotFoundException {
        LoginUser user = DbUtils.getUser(s);
        return user;
    }
}
